import { fileURLToPath, URL } from 'node:url'

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
// @ts-ignore
import {VantResolver} from '@vant/auto-import-resolver'
//引入一个加载vue组件的插件
// @ts-ignore
import Components from 'unplugin-vue-components/vite'

// https://vitejs.dev/config/
// @ts-ignore

export default defineConfig({
  plugins: [
    vue(),
    Components({
      // @ts-ignore
      resolver:[VantResolver()]
    })
  ],
  resolve: {
    alias: {
      '@': fileURLToPath(new URL('./src', import.meta.url))
      // '@': './src',
    }
  }
})
